package com.tyqx.service.impl;

import com.tyqx.bean.model.SubServerInfo;
import com.tyqx.mapper.SubServerInfoMapper;
import com.tyqx.service.SubServerInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SubServerInfoServiceImpl implements SubServerInfoService {

    @Resource
    private SubServerInfoMapper subServerInfoMapper;

    @Override
    public boolean insert(SubServerInfo subServerInfo) {
        if(subServerInfoMapper.insert(subServerInfo)>0){
            return true;
        }else{
            return false;
        }
    }

    @Override
    public List<SubServerInfo> selectSubServerInfos() {
        return subServerInfoMapper.selectSubServerInfos();
    }

    @Override
    public boolean selectSubServerInfoCountByComputName(String computName) {
        if(subServerInfoMapper.selectSubServerInfoCountByComputName(computName)>0){
            return true;
        }else{
            return false;
        }
    }
}
